package com.company.command;

/**
 * 具体命令角色，左转命令
 */
public class LeftCommand implements Command {

    //持有真正执行命令对象的引用
    private RemoteControlCarReceiver receiver;

    public LeftCommand(RemoteControlCarReceiver receiver){
        this.receiver = receiver;
    }


    @Override
    public void execute() {
        System.out.println("按了左转键");
        receiver.left();

    }
}
